<template>
  <div class="my-container">
    <router-view></router-view>
  </div>
</template>

<script setup>
import { RouterView } from "vue-router";
import { ref, onMounted } from "vue";
import store from "@/store";
import { useRouter } from "vue-router";

const router = useRouter();

onMounted(() => {
  if (!store.getters.token) {
    router.push("/my/login");
  }
});
</script>

<style scoped>
.my-container {
  overscroll-behavior: none; /* 阻止下拉刷新 */
  touch-action: none; /* 禁用所有默认的触摸行为 */
  height: 100vh;
}
</style>
